1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'value' of non-object in /var/www/arbalet2/arbaletcentr.ru/templates_c/675243d' at line 10

SELECT p2c.id item_id,
               p.id, 
               p.title as title, 
               p.description, 
               REPLACE(FORMAT(p.price, 0 ), ',', ' ') as price, 
               CONCAT('data/images/',REPLACE(i.image,'.', '.')) as image,
               p.category_id,
               p2c.category_id catid
          FROM products p LEFT JOIN images i ON p.id = i.product_id AND i.is_main = 1, product2category p2c
          WHERE p2c.product_id = '230
Notice: Undefined index: categoryId in /var/www/arbalet2/arbaletcentr.ru/templates_c/675243d834243c2a2fb446d31bf1eaa0bb0cbe03_0.file.product.html.php on line 66

Notice: Trying to get property 'value' of non-object in /var/www/arbalet2/arbaletcentr.ru/templates_c/675243d834243c2a2fb446d31bf1eaa0bb0cbe03_0.file.product.html.php on line 66
' AND p2c.category_id = '7' AND p2c.product_id = p.id